import axios from '@/utils/request.js'
export function findAll(params){
    //处理页码
    let obj = {...params};
    obj.page--;
    //遍历对象
    for (let key in obj){
        if(obj[key]===0){
            continue;
        }
        if(!obj[key]){
            delete obj[key]
        }
    }
    return axios.post('/waiter/query',obj)
}
export function saveOrUpdate(params){
    return axios.post('/waiter/saveOrUpdate',params);
}
//通过id删除顾客
export function deleteById(params){
    return axios.get('/waiter/deleteById',{params})
}
export function findWaiterShou(params){
    //处理页码
    let obj1 = {...params};
    obj1.page--;
    //遍历对象
    for (let key in obj1){
        if(obj1[key]===0){
            continue;
        }
        if(!obj1[key]){
            delete obj1[key]
        }
    }
    return axios.post('/waiter/queryShou',obj1)
}
//根据员工id查询员工收益信息
export function detailsShou(params){
    return axios.get("/waiter/detailsShou",{params})
}
//根据员工id查询员工信息
export function findWaiterById(params){
    return axios.get("/waiter/findWaiterById",{params})
}